package com.github.ecbp.common.utils.excel.utils;

import com.alibaba.excel.event.AnalysisEventListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public abstract class AbstractExcelOperationListener<T> extends AnalysisEventListener<T> {
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 标题行数 (实际+1), 即数据最小行数
     */
    private int headNumber;
    /**
     * 数据处理类型
     */
    private Class<T> classType;

    public AbstractExcelOperationListener() {
        this.headNumber = 0;
    }

    public AbstractExcelOperationListener(int headNumber, Class<T> classType) {
        this.headNumber = headNumber;
        this.classType = classType;
    }

    public int getHeadNumber() {
        return headNumber;
    }

    public Class<T> getClassType() {
        return classType;
    }

    public void setHeadNumber(int headNumber) {
        this.headNumber = headNumber;
    }

    public void setClassType(Class<T> classType) {
        this.classType = classType;
    }
}
